class CreateKnowledges < ActiveRecord::Migration[5.2]
  def change
    create_table :knowledges do |t|
      t.belongs_to :course, foreign_key: true, null: false
      t.string :name, null: false
      t.text :remarks

      t.timestamps

      t.index :name, unique: true
    end
  end
end
